{extend name="pc/admin/layout"/}
{block name="main"}
   <div class="g-1400 g-container" id="pjax-container">
        
<div class="bg-bai b rx3" id="vue-page">
<form id="form-config">
    <div class="t-v t-t">
        <div class="c-sidebar c-sidebar-h pb5 br">
            <div class="c-sidebar-title t-v hui bb">福利配置</div>
            <ul class="c-nav click-nav">
                <li class="active"><a href="{:url('pc/admin',['act'=>'other','s'=>'jfdh'])}" class="t-v" data-pjax>
                    <div><i class="icon icon-form"></i></div>
                    <div>积分兑换设置</div>
                </a></li>
				<li><a href="{:url('pc/admin',['act'=>'other','s'=>'qd'])}" class="t-v" data-pjax>
                    <div><i class="icon icon-form"></i></div>
                    <div>每日签到设置</div>
                </a></li>
				<li><a href="{:url('pc/admin',['act'=>'other','s'=>'cj'])}" class="t-v" data-pjax>
                    <div><i class="icon icon-form"></i></div>
                    <div>抽奖商品设置</div>
                </a></li>
				<li><a href="{:url('pc/admin',['act'=>'other','s'=>'cjset'])}" class="t-v" data-pjax>
                    <div><i class="icon icon-form"></i></div>
                    <div>抽奖规则设置</div>
                </a></li>
            </ul>
        </div>
<div class="c-content bl">
            <div class="col-6 fl br" style="min-height:420px;">
                <div class="g-title t-v pl4 bb">
                    <div class="col-12 h t-v bold">兑换商品设置</div>
                </div>
				<div class="p5 o-h">
					<div class="pt1 pb3 in-text">
						<dt class="bold bb pr2 lan">兑换VIP天数</dt>
						<dd><input class="form w h8 bb" type="number" name="jfdh_vip_num"
                                   value="{:config('sys_jfdh_vip_num')}"></dd>
					</div>
					<div class="pt1 pb3 in-text">
						<dt class="bold bb pr2 lan">兑换配额数量</dt>
						<dd><input class="form w h8 bb" type="number" name="jfdh_peie_num"
                                   value="{:config('sys_jfdh_peie_num')}"></dd>
					</div>
					<div class="pt1 pb3 in-text">
						<dt class="bold bb pr2 lan">兑换代理等级</dt>
						<dd><select class="form w h8 bb" name="jfdh_daili_num">
							<option value="1" {if condition="config('sys_jfdh_daili_num') eq 1" }selected {/if}>0_银牌代理</option>
							<option value="2" {if condition="config('sys_jfdh_daili_num') eq 2" }selected {/if}>1_金牌代理</option>
							<option value="3" {if condition="config('sys_jfdh_daili_num') eq 3" }selected {/if}>2_钻石代理</option>
						</select></dd>
					</div>
				</div>
            </div>
            <div class="col-6 fl bl" style="margin-left:-1px;">
                <div class="g-title t-v pl4 bb">
                    <div class="col-12 h t-v bold">积分兑换设置</div>
                </div>
				<div class="p5 o-h">
					<div class="pt1 pb3 in-text">
						<dt class="bold bb pr2 lan">兑换VIP所需积分</dt>
						<dd><input class="form w h8 bb" type="number" name="jfdh_vip_jf"
                                   value="{:config('sys_jfdh_vip_jf')}"></dd>
					</div>
					<div class="pt1 pb3 in-text">
						<dt class="bold bb pr2 lan">兑换配额所需积分</dt>
						<dd><input class="form w h8 bb" type="number" name="jfdh_peie_jf"
                                   value="{:config('sys_jfdh_peie_jf')}"></dd>
					</div>
					<div class="pt1 pb3 in-text">
						<dt class="bold bb pr2 lan">兑换代理所需积分</dt>
						<dd><input class="form w h8 bb" type="number" name="jfdh_daili_jf"
                                   value="{:config('sys_jfdh_daili_jf')}"></dd>
					</div>
				</div>
            </div>
        </div>
</div>
</form>
<div class="c-pagination o-h t-v">
        <div class="c-sidebar"></div>
        <div class="c-content h11 o-h g-btn t-v bt bl">
            <div class="col-12 h t-v f3 hui pl5 pr5 t-c">
			<button class="btn btn-qing btn-md w22 rx1" @click="saveConfig()">保 存 设 置</button></div>
        </div>
    </div>
</div>

    </div>
   {/block}
   {block name='foot'}
	<script>
        new Vue({
                el: '#vue-page',
                methods: {
                    saveConfig: function () {
                        app.ajax("{:url('admin_ajax/config')}", $("#form-config").serialize(), function (data) {
                            if (data.code === 0) {
                                x.msg(data.message, 2)
                            } else {
                                x.msg(data.message, 2)
                            }
                        })
                    }
                }
            });
    </script>
    {/block}